package com.nazca.tvremote.util;

import android.os.AsyncTask;

public class Utility {
	public static void cancelTaskInterrupt(AsyncTask<?, ?, ?> task){
        cancelTask(task, true);
    }
    
    public static void cancelTask(AsyncTask<?, ?, ?> task, boolean mayInterruptIfRunning){
        if(task != null && task.getStatus() != AsyncTask.Status.FINISHED){
            task.cancel(mayInterruptIfRunning);
        }
    }
}
